import request from '@/utils/request'

// 获取病区 table 数据
export const getWard = (data: any): Promise<any> => request.post('/wardManage/getWardManageList', data)

// 获取病区下拉框分类
export const getWordSelector = (): Promise<any> => request.post('/wardManage/getWardType')

// 获取弹框的目录结构
export const getWordCatalogue = (data: any): Promise<any> => request.post('/wardManage/getOrganization', data)

// 获取年份下拉框
export const getYearSelect = (): Promise<any> => request.get('/userManager/getUserAuditYear')

// 新增管理员
export const addAdmin = (params: any): Promise<any> => request.post('/wardManage/addWardAdmin', params)

// 修改管理员
export const editAdmin = (params: any): Promise<any> => request.post('/wardManage/updateWardAdmin', params)

// 删除管理员
export const deleteAdmin = (params: any): Promise<any> => request.post('/wardManage/deleteWardAdmin', params)

// 导出接口，根据查询条件做导出
export const exportTableData = (params: any): Promise<any> =>
  request.post('/wardManage/exportWardManage', params, { responseType: 'blob' })
